import request from '@/utils/request'

export function fetchRoleList(data) {
  return request({
    url: '/cloud-system/getRoleList',
    method: 'post',
    data
  })
}

export function fetchRoleOne(data) {
  return request({
    url: '/cloud-system/getOneRoleDetail',
    method: 'post',
    data
  })
}

export function createRole(data) {
  return request({
    url: '/cloud-system/createOneRole',
    method: 'post',
    data
  })
}

export function updateRole(data) {
  return request({
    url: '/cloud-system/updateOneRole',
    method: 'post',
    data
  })
}

export function deleteRole(data) {
  return request({
    url: '/cloud-system/deleteOneRole',
    method: 'post',
    data
  })
}

export function lockRole(data) {
  return request({
    url: '/cloud-system/lockOneRole',
    method: 'post',
    data
  })
}

export function unlockRole(data) {
  return request({
    url: '/cloud-system/unlockOneRole',
    method: 'post',
    data
  })
}

export function batchLockRole(data) {
  return request({
    url: '/cloud-system/batchLockRole',
    method: 'post',
    data
  })
}

export function batchUnLockRole(data) {
  return request({
    url: '/cloud-system/batchUnLockRole',
    method: 'post',
    data
  })
}

export function batchDeleteRole(data) {
  return request({
    url: '/cloud-system/batchDeleteRole',
    method: 'post',
    data
  })
}

export function setRoleFunction(data) {
  return request({
    url: '/cloud-system/setRoleFunction',
    method: 'post',
    data
  })
}
